package com.tanhua.mongo.domain;

import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;

/**
 * @author Xiao
 * @date 2021/10/24
 */
@Data
@Document("tb_person")
public class Person implements Serializable {
    private static final long serialVersionUID = -6849794470754667710L;
    @Id
    private ObjectId id;
    @Field("myname")
    private String name;
    private int age;
    private String address;
}
